package com.rui.study.algorithm.T_byte类型右移操作;

import com.rui.study.algorithm.PrintUtil;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * @program: study
 * @description: 、
 * @author: Yaowr
 * @create: 2018-11-05 14:56
 **/
public class Main {

    public static void main(String[] args) {

        try {
            PrintUtil.print(URLEncoder.encode("abc", "utf-8"));
            PrintUtil.print(URLDecoder.decode("%BB%B6%D3%AD%CA%B9%D3%C3%BE%C1%D4%C4%A1%A3%D1%E9%D6%A4%C2%EB%CA%C7%A3%BA9244%2C%CA%E4%C8%EB%D1%E9%D6%A4%C2%EB%BC%CC%D0%F8%CD%EA%B3%C9%B2%D9%D7%F7%A1%A3", "gbk"));

        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

//        byte[] bytes = "你好".getBytes();
//        for (byte b : bytes) {
//            System.out.println(Integer.toBinaryString(b));
//            System.out.println(Integer.toBinaryString(b >> 4));
//        }
    }
}
